<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>第一节课</title>
		<style type="text/css">
			/*去除原来样式*/
			
			* {
				padding: 0;
				margin: 0;
			}
			
			.container {
				width: 100vw;
				height: 100vh;
				display: flex;
				/*
				 * 将边框设置在中间
				 */
				align-items: center;
				justify-content: center;
			}
			
			canvas {
				width: 500px;
				height: 500px;
				border: 1px solid #333333;
			}
		</style>
	</head>

	<body>
		<div class="container">
			<canvas id="canvas" width="600" height="600"></canvas>
		</div>
	</body>

	<script>
		
		window.onload = function() {
			//let oCanvas = document.getElementById('canvas');
			let oCanvas = document.getElementById("canvas");
			let pen = oCanvas.getContext("2d");

			console.dir(pen);
			pen.beginPath();
			pen.arc(300,300,200,0,360*Math.PI/180,true);
			pen.fillStyle="black";
			pen.fill();
			pen.stroke();
			pen.closePath();
			
			pen.beginPath();
			pen.strokeStyle="white";
			pen.lineWidth=20;
			pen.arc(225,225,50,0,360*Math.PI/180,true);
			pen.stroke();
			pen.closePath();
			
			pen.beginPath();
			pen.strokeStyle="white";
			pen.arc(375,225,50,0,360*Math.PI/180,true);
			pen.stroke();
			pen.closePath();
			
			pen.beginPath();
			pen.strokeStyle="white";
			pen.arc(300,375,70,0,180*Math.PI/180,false);
			pen.closePath();
			pen.stroke();
			
			
			pen.beginPath();
			pen.strokeStyle="black";
			pen.arc(100,300,50,-80*Math.PI/180,80*Math.PI/180,true);
			//pen.closePath();
			pen.stroke();
			
			
			pen.beginPath();
			pen.strokeStyle="black";
			pen.arc(500,300,50,-100*Math.PI/180,100*Math.PI/180,false);
			//pen.closePath();
			pen.stroke();
			
			
			pen.beginPath();
			pen.strokeStyle="black";
			pen.arc(300,100,50,-100*Math.PI/180,100*Math.PI/180,true);
			//pen.closePath();
			pen.stroke();
			
			pen.beginPath();
			pen.strokeStyle="black";
			pen.arc(350,100,50,-100*Math.PI/180,100*Math.PI/180,true);
			//pen.closePath();
			pen.stroke();
			
			pen.beginPath();
			pen.strokeStyle="black";
			pen.arc(400,120,50,-100*Math.PI/180,150*Math.PI/180,true);
			//pen.closePath();
			pen.stroke();
			
			
			
		}
	</script>

</html>